package com.example.zg.ui_demo.retrofitservice;

import com.example.zg.ui_demo.beans.Dish;
import com.example.zg.ui_demo.beans.Result;
import com.example.zg.ui_demo.beans.UserId;

import java.util.List;

import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

public interface RetrofitService {
    @GET("dishes")
    Call<List<Dish>> getDishes();

    @GET("dish")
    Call<Result> getDish(@Query("id") String id);

    @GET("dish/{id}")
    Call<Result> getDishByPathParam(@Path("id") String id);

    @GET("foodService/userLogin.do")
    Call<UserId> getUserId(@Query("username") String username,
                           @Query("userpass") String password);
    @GET("getShopById.do")
    Call<ResponseBody> getShopById(@Query("shop_id")String shop_id);
}
